
import * as THREE from 'three';
import twin from './twin';
// 三维场景中添加一个立方体
const geometry = new THREE.BoxGeometry(3, 3, 3);
const material = new THREE.MeshBasicMaterial({
    color: 0x00ffff, 
    transparent: true,
    opacity: 0.5
});
const mesh = new THREE.Mesh(geometry, material);
mesh.position.set(0, 0, -5);
mesh.add(new THREE.AxesHelper(2));
twin.scene.add(mesh);  

//jit.gltf模型加载
twin.gltfLoader.load('./models/nicole_by_ghost73.glb',function(gltf){
    twin.scene.add(gltf.scene);
    const axes=new THREE.AxesHelper(2);
    gltf.scene.add(axes);
    gltf.scene.position.set(1,0,0);
    console.log(gltf);
})
//添加一个光源方便观察模型
const ambient = new THREE.AmbientLight(0xffffff, 1.0);
twin.scene.add(ambient);
